/* MongoDB schema for User API model */

var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var UserSchemaModel = new Schema({
    id           : { type: Number, required: true},
    name         : { type: String, required: true},
    google_id    : { type: String, required: true},
    avatar       : String,
    email        : String,
    games_played : Number,
    points       : Number,
    date         : { type: Date, required: true}
});

var UserSchema = exports.UserSchema = mongoose.model('User', UserSchemaModel, 'users'); 
